package fun.werfamily.wf.order.core.domain.remote.service;

import fun.werfamily.wf.base.constant.ServiceConstant;
import fun.werfamily.wf.base.vo.Result;
import fun.werfamily.wf.order.core.domain.dto.req.goods.GoodsDetailReqDTO;
import fun.werfamily.wf.order.core.domain.dto.req.goods.GoodsListReqDTO;
import fun.werfamily.wf.order.core.domain.dto.req.goods.GoodsSkuDTO;
import fun.werfamily.wf.order.core.domain.dto.req.goods.GoodsSkuDetailReqDTO;
import fun.werfamily.wf.order.core.domain.dto.result.goods.GoodsSpuDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Mr.WenMing Zhang
 * @Date: 2022-08-28 12:28
 * @Description:
 */
@FeignClient(name = ServiceConstant.GOODS_CORE_NAME, path = ServiceConstant.GOODS_CORE_PATH)
public interface GoodsRemoteService {

    @ApiOperation("商品列表")
    @PostMapping("/open/goods/list")
    Result<List<GoodsSpuDTO>> goodsList(@RequestBody GoodsListReqDTO goodsListReqDTO);

    @ApiOperation("商品spu详情")
    @PostMapping("/open/goods/spu/detail")
    Result<GoodsSpuDTO> goodsSpuDetail(@RequestBody GoodsDetailReqDTO goodsDetailReqDTO);

    @ApiOperation("商品sku详情")
    @PostMapping("/open/goods/sku/detail")
    Result<List<GoodsSkuDTO>> goodsSkuDetail(@RequestBody GoodsSkuDetailReqDTO goodsSkuDetailReqDTO);
}
